from django.db import models

class Problem(models.Model):
    id = models.CharField(max_length=10, primary_key=True)
    title = models.CharField(max_length=200)
    star = models.CharField(max_length=20)
    cpu_limit = models.IntegerField()
    mem_limit = models.IntegerField()
    desc = models.TextField()
    header = models.TextField()
    tail = models.TextField()

    class Meta:
        db_table = 'oj_problems'  # 指定表名与数据库中的表名一致

    def __str__(self):
        return self.title